<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/include/page.jsp"%>
<!DOCTYPE HTML>
<html>
	<head>
		<link rel="stylesheet" type="text/css" href="${rootPath}/common/resource/H-ui.admin/static/h-ui.admin/css/H-ui.login.css" />
		<%@ include file="/common/include/title.jsp"%>
		<title>后台登录 - 用户中心</title>
		<meta name="keywords" content="用户中心 keywords">
		<meta name="description" content="用户中心 description">
	</head>
	<body>
		 <input type="hidden" id="TenantId" name="TenantId" value="" /> 
		 
		<div class="header">
			<span class="ml-20">用户中心</span>
		</div>	
		
		<div class="loginWraper">
			<div id="loginform" class="loginBox">
				<form class="form form-horizontal" action="${rootPath }/loginSubmit.htm" method="post">
					<input type="hidden" name="returnUrl" value="${param.returnUrl}">
					
					 <div class="row cl">
						<label class="form-label col-xs-3"><i class="Hui-iconfont">&#xe60d;</i></label>
						<div class="formControls col-xs-8">
							<input id="email" name="email" type="text" placeholder="账号" value="${sessionScope.adminsEmail}"
								class="input-text size-L">
						</div>
					</div> 
					<div class="row cl">
						<label class="form-label col-xs-3"><i class="Hui-iconfont">&#xe60e;</i></label>
						<div class="formControls col-xs-8">
							<input id="password" name="password" type="password" placeholder="密码"
								class="input-text size-L">
						</div>
					</div>
					
					<c:if test="${sessionScope.failedCount>=3&&sessionScope.failedCount<5}">
						<div class="row cl">
							<div class="formControls col-xs-8 col-xs-offset-3">
								<input class="input-text size-L" type="text" placeholder="验证码" name="code" id="code"
									style="width: 150px;">
								<a href="#" tabindex="-1" onclick="return refreshCode('imgCode');">
									<img id="imgCode" src="${rootPath }/common/randImg.htm" title="点击刷新验证码" width="100" height="35" />
								</a>
							</div>
						</div>
					</c:if>
					<div class="row cl">
						<div class="formControls col-xs-8 col-xs-offset-3">
							<a href="${rootPath}/forgetPass.htm" style="float:left;color:rgb(46, 130, 255);">
										忘记密码? </a>
							<a href="${rootPath}/forgetPass.htm?status=thawAccount" style="margin-right: 40px;float:right;color:rgb(46, 130, 255);">
										申请解冻账号 </a>
						</div>
					</div>
					<div class="row cl">
						<div class="formControls col-xs-8 col-xs-offset-3">
							<input name="" type="submit" class="btn btn-success radius size-L"
								value="&nbsp;登&nbsp;&nbsp;&nbsp;&nbsp;录&nbsp;"> <input
								name="" type="reset" class="btn btn-default radius size-L"
								value="&nbsp;取&nbsp;&nbsp;&nbsp;&nbsp;消&nbsp;">
						</div>
					</div>
					<div class="row cl">
						<div class="formControls col-xs-8 col-xs-offset-3">
							 <c:choose>
							 	<c:when test="${fn:containsIgnoreCase(response.info,'五次')}">
									<p id="error"  class="error_info"></p>
								</c:when>
								<c:when test="${sessionScope.temporary!=null&&sessionScope.temporary!=''}">
									<p id="error"  class="error_info">${sessionScope.temporary}</p>
								</c:when>
								<c:otherwise>  
									<p class="error_info">${response.info}</p>
								</c:otherwise>							 
							 </c:choose>
						</div>
					</div>
				</form>
			</div>
		</div>
		<div class="footer" style="font-size:18px">技术支持:  用户中心</div>
		<%@ include file="/common/include/footer.jsp"%>
		
		<script type="text/javascript">
		var message="${fn:containsIgnoreCase(response.info,'五次')}";
		var maxtime=${fn:replace(response.info,'五次','')};
		if(message){
			 timer = setInterval("CountDown()", 1000);
		}
		
	     function CountDown() {
	       if (maxtime >= 0) {
	         minutes = Math.floor(maxtime / 60);
	         seconds = Math.floor(maxtime % 60);
	         msg = "密码错误次数过多，冻结十分钟。还剩" + minutes + "分" + seconds + "秒";
	         $("#error").text(msg);
	          --maxtime;
	       } else{ 
	         clearInterval(timer);
	         $("#error").text("");
	       }
	     }
		</script>
		
	</body>
</html>